import { ApiProperty } from '@nestjs/swagger';
import { Column, Entity } from 'typeorm';
import { BaseEntity } from '../../../base.entity';

@Entity({ name: 'base_alarm' })
export default class BaseAlarm extends BaseEntity {
  @Column({ type: 'varchar', unique: true, length: 50, name: 'alarm_code', comment: '报警编码' })
  @ApiProperty()
  alarmCode: string;

  @Column({ type: 'varchar', length: 100, name: 'alarm_name', comment: '报警名称' })
  @ApiProperty()
  alarmName: string;

  @Column({ type: 'varchar', length: 100, name: 'machine_code', comment: '设备编码' })
  @ApiProperty()
  machineCode: string;

  @Column({ type: 'varchar', length: 100, name: 'alarm_area', comment: '报警区域', nullable: true })
  @ApiProperty()
  alarmArea: string;

  @Column({ type: 'varchar', length: 100, name: 'alarm_type_code', comment: '报警类型编码' })
  @ApiProperty()
  alarmTypeCode: string;

  @Column({ type: 'varchar', nullable: true, comment: '备注' })
  @ApiProperty()
  remark: string;
}
